package com.leonzhangxf.code.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author leonzhangxf
 */
@FeignClient(value = "service-email", path = "/email", fallback = EmailApiFallback.class)
@Component
public interface EmailApi {

    @PostMapping("/{email}/{code}")
    Boolean sendEmail(
        @PathVariable("email") String email,
        @PathVariable("code") String code
    );
}
